<template>
  <div class="breadcrumb">
    <el-card class="box-card">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item
          v-for="(item, index) in $route.matched"
          :key="index"
          >{{ item.name }}</el-breadcrumb-item
        >
      </el-breadcrumb>
    </el-card>
  </div>
</template>

<script>
export default {
  created() {
    // console.log(this.$route.matched); // 拿到每一层路由的信息
  },
};
</script>

<style></style>
